#!/usr/bin/env bash
# ******************************************************
# Author       : kaleo
# Last modified: 2016-12-31 13:51
# Email        : kaleo1990@hotmail.com
# Filename     : updateconfig
# Description  : 
# ******************************************************
if [ x$3 = x ]
then
host=127.0.0.1
else
host=$3
fi
if [ x$1 = x ]
then
echo 'please input name value h'
else
echo "update homestead.sysconfigs set value='$2' where name='$1';"|mysql -h$host -uhomestead -psecret
fi
echo "select * from homestead.sysconfigs ;"|mysql -h$host -uhomestead -psecret
